package cn.com.huzo.model.entities.manufacture;

import huzofw.model.entities.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import java.sql.Timestamp;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 加工费计算-明细表记录实体类
 * <p>
 * @author 吴旭
 */
public class CmtSettlementSlipLinesEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = 266536562200992606L;
    private String LinesId;
    private Long HeaderId;
    private String CpcLinesId;                    // 加工合同明细标识 
    private String SideBName;                     // 加工厂
    private String StyleNo;                       // 款号
    private String ProductName;                   // 品名
    private Integer CpcQuantity;                  // 订单数量=加工数量
    private Float NoTaxProcessingFee;             // 加工费（不含税）
    private Float HasTaxProcessingFee;            // 加工费（含税）
    private Float SlidingProcessCost;             // 浮动加工费（不含税）
    private Timestamp DateOfDelivery;             // 发货日期
    private Timestamp MaterialReceiptedDate;      // 配送料日期
    private Integer CompletedQuantity;            // 已结算数量
    private Integer CurrentMonthQuantity;         // 本月数量
    private Integer CheckQuantity;                // 支票数量
    private String Description;

    public String getLinesId() {
        return LinesId;
    }

    public void setLinesId(String LinesId) {
        this.LinesId = LinesId;
    }

    public Long getHeaderId() {
        return HeaderId;
    }

    public void setHeaderId(Long HeaderId) {
        this.HeaderId = HeaderId;
    }

    public String getCpcLinesId() {
        return CpcLinesId;
    }

    public void setCpcLinesId(String CpcLinesId) {
        this.CpcLinesId = CpcLinesId;
    }

    public String getSideBName() {
        return SideBName;
    }

    public void setSideBName(String SideBName) {
        this.SideBName = SideBName;
    }

    public String getStyleNo() {
        return StyleNo;
    }

    public void setStyleNo(String StyleNo) {
        this.StyleNo = StyleNo;
    }

    public String getProductName() {
        return ProductName;
    }

    public void setProductName(String ProductName) {
        this.ProductName = ProductName;
    }

    public Integer getCpcQuantity() {
        return CpcQuantity;
    }

    public void setCpcQuantity(Integer CpcQuantity) {
        this.CpcQuantity = CpcQuantity;
    }

    public Float getNoTaxProcessingFee() {
        return NoTaxProcessingFee;
    }

    public void setNoTaxProcessingFee(Float NoTaxProcessingFee) {
        this.NoTaxProcessingFee = NoTaxProcessingFee;
    }

    public Float getHasTaxProcessingFee() {
        return HasTaxProcessingFee;
    }

    public void setHasTaxProcessingFee(Float HasTaxProcessingFee) {
        this.HasTaxProcessingFee = HasTaxProcessingFee;
    }

    public Float getSlidingProcessCost() {
        return SlidingProcessCost;
    }

    public void setSlidingProcessCost(Float SlidingProcessCost) {
        this.SlidingProcessCost = SlidingProcessCost;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Timestamp getDateOfDelivery() {
        return DateOfDelivery;
    }

    public void setDateOfDelivery(Timestamp DateOfDelivery) {
        this.DateOfDelivery = DateOfDelivery;
    }

    public Integer getCompletedQuantity() {
        return CompletedQuantity;
    }

    public void setCompletedQuantity(Integer CompletedQuantity) {
        this.CompletedQuantity = CompletedQuantity;
    }

    public Integer getCurrentMonthQuantity() {
        return CurrentMonthQuantity;
    }

    public void setCurrentMonthQuantity(Integer CurrentMonthQuantity) {
        this.CurrentMonthQuantity = CurrentMonthQuantity;
    }

    public Integer getCheckQuantity() {
        return CheckQuantity;
    }

    public void setCheckQuantity(Integer CheckQuantity) {
        this.CheckQuantity = CheckQuantity;
    }

    public String getDescription() {
        return Description;
    }

    public void setDescription(String Description) {
        this.Description = Description;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Timestamp getMaterialReceiptedDate() {
        return MaterialReceiptedDate;
    }

    public void setMaterialReceiptedDate(Timestamp MaterialReceiptedDate) {
        this.MaterialReceiptedDate = MaterialReceiptedDate;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof CmtSettlementSlipLinesEntity)) {
            return false;
        }

        final CmtSettlementSlipLinesEntity that = (CmtSettlementSlipLinesEntity) o;

        return new EqualsBuilder()
                .append(this.getLinesId(), that.getLinesId())
                .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + this.getLinesId().hashCode();

        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
